/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package StackAndHeap;

/**
 *
 * @author Ibon
 */
class Dog {

    Collar c; // instance variable
    String name; // instance variable
    void go(Dog dog) { // local variable: dog
        c = new Collar();
        dog.setName("Aiko");
    }

    void setName(String dogName) { // local var: dogName
        name = dogName;
        // do more stuff
    }
}
